﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZY.EntityFrameWork.Core.Model.Dto.Authority;
using ZY.EntityFrameWork.Core.Model.Entity.Authority;

namespace ZY.EntityFrameWork.Caller.Facade
{
    public interface IAuthorityService
    {
        #region User
        int AddNewUser(UserDto userDto);

        bool CheckUser(string userCode, string passWord);

        List<UserDto> GetAllUsers();
        #endregion

        #region Module
        List<ModuleDto> GetAllModules();
        #endregion

        #region Role
        List<RoleDto> GetAllRoles();
        List<RoleModuleDto> GetRolePermissions(string roleName);

        /// <summary>
        /// 更新用户权限
        /// </summary>
        /// <param name="roleModules"></param>
        /// <returns></returns>
        int UpdateRole(List<RoleModuleDto> dtos);
        #endregion
    }
}